<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>GrPPI: Install Notes</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.svg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">GrPPI
   &#160;<span id="projectnumber">0.2</span>
   </div>
   <div id="projectbrief">Generic and Reusable Parallel Pattern Interface</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Install Notes </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h2>Building GrPPI</h2>
<h3>Building the library</h3>
<p>GrPPI is a <em>header-only</em> library. Consequently no build process is required for the library itself.</p>
<p>However, GrPPI includes CMake scripts for supporting the following actions:</p>
<ul>
<li>Building the unit tests.</li>
<li>Performing coverage analysis on unit tests.</li>
<li>Generating the <b>doxygen</b> based documentation.</li>
<li>Building the sample programs.</li>
<li>Installing the library in your system</li>
</ul>
<p>To setup the build scripts we recommend that you create an <em>out-of-source</em> directory under the GrPPI root directory:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;mkdir build</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;cd build</div></div><!-- fragment --><p>Then, you may generate the scripts by just doing:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cmake ..</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;make</div></div><!-- fragment --><p><b>Important Note:</b> Be sure to invoke make once before modifying you <code>CMakeCache.txt</code> file. This will allow CMake to compile and setup dependent libraries (e.g. GoogleTest).</p>
<h3>Building the unit tests</h3>
<p>To build the unit tests, you need to set configuration variable <code>GRPPI_UNIT_TEST_ENABLE</code> to <code>ON</code>. You can do so be using the CMake GUI or by typing:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cmake .. -DGRPPI_UNIT_TEST_ENABLE=ON</div></div><!-- fragment --><p>Then, you can build the unit tests by typing:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;make</div></div><!-- fragment --><h3>Disabling specific GrPPI back ends</h3>
<p>You may want to disable specific back ends. GrPPI offers specific variables to control this issue:</p>
<ul>
<li><code>GRPPI_OMP_ENABLE</code>: Enable/disable OpenMP back end.</li>
<li><code>GRPPI_TBB_ENABLE</code>: Enable/disable TBB back end.</li>
</ul>
<h3>Running the unit tests</h3>
<p>To run all the unit tests you can do:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;make test</div></div><!-- fragment --><p>or alternatively:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;ctest</div></div><!-- fragment --><h3>Performing coverage analysis</h3>
<p>To perform a coverage analysis type:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;make coverage</div></div><!-- fragment --><p>The coverage HTML reports are generated under <code>unit_tests/mycov/index.html</code>.</p>
<h3>Documentation generation</h3>
<p>Documentation generation is disabled by default. However, if you wish to build the documentation yourself, you may enable the option:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cmake .. -DGRPPI_DOXY_ENABLE=ON</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;make</div></div><!-- fragment --><p>This will generate a doc directory under your build tree with the generated documentation.</p>
<p><b>Note:</b> You will need a <b>doxygen</b> in your system to make use of this option. You will also need <b>graphviz</b>.</p>
<h3>Building the sample programs</h3>
<p>GrPPI includes a number of example programs under directory <b>samples</b>. To build all samples you may use:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cmake .. -DGRPPI_EXAMPLE_PROGRAMS_ENABLE=ON</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;make</div></div><!-- fragment --><h3>Installing GrPPI</h3>
<p>If you want to install GrPPI in your system you can select to install in the default directory:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;sudo make install</div></div><!-- fragment --><p>This will install the header files under <code>/usr/local/include/grppi</code></p>
<p>You can specify a different install directory to CMake:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cmake .. -DCMAKE_INSTALL_PREFIX=path/to/folder</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;make install</div></div><!-- fragment --><h2>Supported Compilers</h2>
<p>For using GrPPI you need a C++14 compliant compiler.</p>
<p>GrPPI has been tested with the following compilers:</p>
<ul>
<li>**g++** 6.1.</li>
<li>**clang++** 3.4.</li>
</ul>
<p>If you want to use a different compiler than the default one, you can specify it by doing:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cmake .. -DCMAKE_CXX_COMPILER=clang++</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;make</div></div><!-- fragment --><h2>Required Libraries</h2>
<p>Miminal support of GrPPI requires the following libraries.</p>
<ul>
<li><a href="http://www.boost.org/">BOOST</a> version 1.58 or above.</li>
</ul>
<h2>Additional Libraries</h2>
<p>In order to use the <b>Intel Threading Building Blocks</b> (TBB) back-end you need to install the following library:</p>
<ul>
<li><a href="https://www.threadingbuildingblocks.org/">TBB</a></li>
</ul>
<h2>Unit tests and coverage analysis</h2>
<p>For unit testing GrPPI uses the GoogleTest framework. However you do not need to install it yourself. The framework is locally downloaded and compiled in your build tree to ensure that the right version is used. For more details see section (building).</p>
<p>If you want to run unit tests and perform coverage analysis you will need:</p>
<ul>
<li><a href="https://github.com/linux-test-project/lcov">lcov</a> To generate gcov HTML reports. </li>
</ul>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
